<template>
  <div class="detailedProducts">
    <div class="box">
      <div
        class="box-item"
        :style="{ backgroundColor: pro.background }"
      >
        <div class="item-img">
          <img class="auto-img" :src="pro.pic" alt="" />
        </div>

        <div class="item-footer-img">
          <div class="titleda">{{ pro.title }}</div>
          <div
            class="jisshao"
            :style="{ backgroundColor: pro.descBackground }"
          >
            {{ pro.desc }}
          </div>
          <img class="auto-img" :src="pro.titleBackground" alt="" />
        </div>
      </div>
    </div>
  </div>
</template>

<script>
// 导入首页数据
// import { homedata } from "../json/homedata";
export default {
  name: "DetailedProducts",
  props: {
    pro: {
      type: Object,
      default() {
        return {};
      },
    },
  },

  // data() {
  //   return {
  //     // 保存商品数据
  //     paoductsdata: [],
  //   };
  // },

  // created() {
  //   this.getpaoductsDealies();
  // },

  // //方法
  // methods: {
  //   // 商品数据
  //   getpaoductsDealies() {
  //     let paoductsdatas = homedata[2].list;
  //     this.paoductsdata = paoductsdatas;

  //     console.log(" this.middleNavDatas=>", paoductsdatas);
  //   },
  // },
};
</script>

<style lang="scss" scoped>
.box {
  display: flex;
  .box-item {
    position: relative;
    width: 108px;
    margin: 0 4px;
    background-color: #f2f1ed;
  }
  .titleda {
    position: absolute;
    top: 125px;
    text-align: center;
    font-size: 12px;
    width: 108px;
    text-align: center;
  }
  .jisshao {
    position: absolute;
    font-size: 12px;
    top: 100px;
    height: 16px;
    width: 95px;
    margin: 0 6px;
    border-radius: 8px;
    text-align: center;
    overflow: hidden;
    color: white;
  }
}
</style>